package com.medical.system.model.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.medical.excel.annotation.ExcelDictFormat;
import com.medical.excel.convert.ExcelDictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Schema(description ="登录日志对象")
@Data
public class LoginInforVO {

    @Schema(description = "访问ID")
    @ExcelProperty(value = "序号")
    private Long infoId;

    @Schema(description = "用户账号")
    @ExcelProperty(value = "用户账号")
    private String userName;

    @Schema(description = "客户端")
    @ExcelProperty(value = "客户端")
    private String clientKey;

    @Schema(description = "设备类型")
    @ExcelProperty(value = "设备类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_device_type")
    private String deviceType;

    @Schema(description = "登录状态（0成功 1失败）")
    @ExcelProperty(value = "登录状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_common_status")
    private String status;

    @Schema(description = "登录IP地址")
    @ExcelProperty(value = "登录地址")
    private String ipaddr;

    @Schema(description = "登录地点")
    @ExcelProperty(value = "登录地点")
    private String loginLocation;

    @Schema(description = "浏览器类型")
    @ExcelProperty(value = "浏览器")
    private String browser;

    @Schema(description = "操作系统")
    @ExcelProperty(value = "操作系统")
    private String os;

    @Schema(description = "提示消息")
    @ExcelProperty(value = "提示消息")
    private String msg;

    @Schema(description = "访问时间")
    @ExcelProperty(value = "访问时间")
    private Date loginTime;
}
